<template>
  <div class="monitor-header">
    <div class="monitor-name" :style="{ color: color, marginLeft: marginLeft }">{{title}}</div>
    <div class="monitor-btns">
      <slot name="btns"></slot>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    title: {
      type: String
    },
    color: {
      type: String,
      default: "#fff"
    },
    marginLeft:{
      type: String,
      default: "42%"
    }
  },
  data() {
    return {}
  }
}
</script>
<style lang="less" scoped>
.monitor-header {
  position: relative;
  height: 80px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .monitor-name {
    margin-left: 42%;
    height: 100%;
    text-align: center;
    font-size: 32px;
    line-height: 80px;
  }
  .monitor-btns {
    display: flex;
    button {
      background-color: #D7D6DC;
      padding: 5px 10px;
      margin-right: 10px;
      border-radius: 5px;
      font-size: 20px;
      cursor: pointer;
    }
  }
}
</style>
